#ifndef __DSTRING_H
#define __DSTRING_H

#include "ebox_type.h"
template <class T>
void swap(T *a,T *b)
{
    T temp;
    temp = *a;
    *a= *b;
    *b = temp;
}
int         atoi(char *str, uint16_t base ); 			/* Convert a string to integer number */
int         ValidATOI(char *str, int base, int *ret); 		/* Verify character string and Convert it to (hexa-)decimal. */
int         find_str(uint8_t *s_str, uint8_t *p_str, uint16_t count, uint16_t &seek);
uint16_t    get_str(char *source, const char *begin, uint16_t count1, const char *end, uint16_t count2, char *out);
uint16_t    get_str(char *source, const char *begin, uint16_t count, uint16_t length, char *out);
uint16_t    get_str(char *source, char *out, uint16_t length);
uint16_t    get_str(char *source, const char *end, uint16_t count, char *out);


#endif
